<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <include file="Public:jquery" />
        <include file="Public:startapp" />
        <include file="Public:startmoo" />
        <script type="text/javascript">
            $(function(){
                $('input[name="password"]').keypress(function(){
                	if ($(this).hasClass('error_input')){
                		$(this).removeClass('error_input');
                		$(this).next('.error_info').remove();
                	}
                });
                $('input[name="repassword"]').keypress(function(){
                	if ($(this).hasClass('error_input')){
                		$(this).removeClass('error_input');
                		$(this).next('.error_info').remove();
                	}
                });
                
                $('form').submit(function(){
                	var $_password = $('input[name="password"]');
                	if ($_password.val().length < 6){
                		if ($_password.hasClass('error_input') == false){
                			$_password.addClass('error_input');
                			$_password.after('<span class="error_info">密码不能少于6个字符</span>');
                		}
                		return false;
                	}
                	
                	var $_repassword = $('input[name="repassword"]');
                	if ($_repassword.val() != $_password.val()){
                		if ($_repassword.hasClass('error_input') == false){
                			$_repassword.addClass('error_input');
                			$_repassword.after('<span class="error_info">两次密码不相同</span>');
                		}
                		return false;
                	}
                });
            });
        </script>
    </head>
    <body>
        <include file="Public:header" />
        
        <div class="layout">
            
            <include file="Public:position" />
            
            <table class="warp" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="sidebar" valign="top">
                        <include file="Public:sidebar" />
                    </td>
                    <td class="contents" valign="top">
                        
                        <ul class="act_this">
				    		<li><a href="{:U('index?tag='.$_GET['tag'])}">基本信息</a></li>
				    		<li><a href="{:U('info?tag='.$_GET['tag'])}">附加资料</a></li>
				    		<li class="this">修改密码</li>
				    	</ul>
	                    
                        <div class="a_table">
                        <form action="__URL__/update/type/password" method="post">
				    	<table cellspacing="1" width="100%" class="form_table">
							<tr>
								<td align="right">新密码</td>
								<td align="left"><input type="password" name="password" class="input_text w480" /></td>
							</tr>
							<tr>
								<td align="right">验证密码</td>
								<td align="left"><input type="password" name="repassword" class="input_text w480" /></td>
							</tr>
							<tr>
								<td></td>
								<td><div class="submit_default_box"><input type="submit" name="setpassword" class="submit_default" value="提交修改" /><span class="submit_default_icon" id="submit_icon"></span></div></td>
							</tr>
						</table>
						</form>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        
        <include file="Public:footer" />
    </body>
</html>